package pay

import (
	"github.com/iGoogle-ink/gopay/alipay"
)



type AliPay struct {
	Appid          string
	PrivateKey     string
	IsProd         bool
	AppCertPath    string
	RootCertPath   string
	PublicCertPath string
}


func NewAliPay(c *AliPay) (client *alipay.Client) {
	client = alipay.NewClient(c.Appid, c.PrivateKey, c.IsProd)
	client.SetNotifyUrl("https://www.igoogle.ink")
	// todo: 设置证书
	//err := client.SetCertSnByPath(c.AppCertPath, c.RootCertPath, c.PublicCertPath)
	//if err != nil {
	//	panic(err)
	//}
	return client
}

